package com.reading.controller;

import com.reading.pojo.Shell;
import com.reading.service.ShellService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("shell")
public class ShellController {

    @Autowired
    private ShellService shellService;

    @RequestMapping("/findAll")
    public List<Shell> findAll(){
        return shellService.findAll();
    }

    @RequestMapping("/findById")
    public Shell findById(Integer id){
        return shellService.findById(id);
    }
}
